<template>
	<!-- 业绩查询 -->
	<view class="query">
		<view class="top_nav" :style="{background:newColor.color}">
			<text>订单数</text>
			<text>订单金额</text>
			<text>提成金额</text>
		</view>
		<view class="today">
			<text class="text1">本日</text>
			<text class="text2">{{dataList.day.order_total_num || 0}}</text>
			<text class="text3">￥{{dataList.day.order_total_money || 0}}</text>
			<text class="text4">￥{{dataList.day.total_money || 0}}</text>
		</view>
		<view class="today">
			<text class="text1">本周</text>
			<text class="text2">{{dataList.week.order_total_num || 0}}</text>
			<text class="text3">￥{{dataList.week.order_total_money || 0}}</text>
			<text class="text4">￥{{dataList.week.total_money || 0}}</text>
		</view>
		<view class="today">
			<text class="text1">本月</text>
			<text class="text2">{{dataList.month.order_total_num || 0}}</text>
			<text class="text3">￥{{dataList.month.order_total_money || 0}}</text>
			<text class="text4">￥{{dataList.month.total_money || 0}}</text>
		</view>
		<ourLoading isFullScreen :active="active" text="loading..." />
	</view>
</template>

<script>
	export default {
		data(){
			return{
				active: true,
				dataList:[],
				status: 1
			}
		},
		onShow() {
			this.status = this.$Route.query.status
			this.getMyinfo()
			setTimeout(() => {
				this.active = false;
			}, 600);
		},
		methods:{
			getMyinfo(){
				this.request('user/getMyLeaderGoodsPoint',{
					type: this.status
				}).then(res=>{
					console.log(res)
					this.mydata = res.data
					this.typeid = res.data[0].id
					this.getData()
				})
			},
			getData(){
				this.request('fund/queryOrderMoney',{
					type: this.status,
					type_id: this.typeid
				}).then(res=>{
					console.log(res)
					this.dataList = res.data
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.query{
		overflow: hidden;
		.top_nav{
			height:80upx;
			background:rgba(242,58,58,1);
			box-shadow:0px 0px 21upx 0px rgba(255,74,44,0.1);
			border-radius:12upx;
			color: #FFFFFF;
			line-height: 80upx;
			margin: 20upx 30upx;
			display: flex;
			text{
				flex: 1;
				text-align: center;
				font-size: 28upx;
			}
		}
		.today{
			height:80upx;
			background-color: #FFFFFF;
			box-shadow:0px 0px 21upx 0px rgba(255,74,44,0.1);
			border-radius:12upx;
			line-height: 80upx;
			margin: 20upx 30upx;
			display: flex;
			.text1{
				width:40upx;
				font-size:28upx;
				font-family:Droid Sans Fallback;
				font-weight:400;
				float: left;
				display: flex;
				line-height: 30upx;
				margin: 10upx 20upx;
				color:rgba(136,136,136,1);
			}
			.text2{
				font-size: 28upx;
				color: #F23A3A;
				width: 20vw;
				margin-left: 20upx;
				text-align: left;
			}
			.text3{
				width: 20vw;
				margin-left: 20upx;
				font-size: 28upx;
				text-align: center;
				color: #F23A3A;
			}
			.text4{
				width: 20vw;
				font-size: 28upx;
				text-align: right;
				color: #F23A3A;
				margin-left: 40upx;
			}
		}
	}
</style>
